<?php

namespace common\models\pdd;

use common\models\base\ActiveRecord;
use Yii;

/**
 * This is the model class for table "pdd_auth_cats".
 *
 * @property int $id
 * @property int $uid 用户uid
 * @property int $mall_id 店铺id
 * @property string|null $cat_ids 允许发布的类目id，json存储
 * @property int $sync_at 最后同步时间
 */
class PddAuthCats extends ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'pdd_auth_cats';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['uid', 'mall_id', 'sync_at'], 'required'],
            [['uid', 'mall_id', 'sync_at'], 'integer'],
            [['cat_ids'], 'string'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uid' => '用户uid',
            'mall_id' => '店铺id',
            'cat_ids' => '允许发布的类目id，json存储',
            'sync_at' => '最后同步时间',
        ];
    }
}
